package javabean;

import cn.hutool.core.annotation.Alias;
import cn.hutool.core.util.ReUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;

@ApiModel(description = "")
@Data
public class TerminalInsertPost {
    @ApiModelProperty(value = "", required = true)
    @Alias("dddddd")
    @Length(min = 1, max = 50, message = "")
    @NotBlank(message = "{terminal.groupId}")
    private String groupId = "ddkkd";
    @NotBlank(message = "{terminal.terminalType}")
    private String terminalType;
    @Valid
    @NotEmpty(message = "{terminal.list}")
    @Size(min = 1, message = "")
    @NotNull(message = "不能为空")
    private List<Object> list;

    public static void main(String[] args) {
        String dd = "^(\\d{2,4})(\\d{1,2})(\\d{1,2})$";
        System.out.println(ReUtil.isMatch(dd, "20221202"));
    }
}